package cn.wolfcode.wolf2w.business.util;

import lombok.Getter;

import java.util.Arrays;
import java.util.List;

@Getter
public enum TravelTimeType {
    TYPE1(1, Arrays.asList(1,2)),
    TYPE2(2, Arrays.asList(3,4)),
    TYPE3(3, Arrays.asList(5,6)),
    TYPE4(4, Arrays.asList(7,8)),
    TYPE5(5, Arrays.asList(9,10)),
    TYPE6(6, Arrays.asList(11,12));

    private Integer type;
    private List<Integer> mounths;


    private

    <T> TravelTimeType(Integer type, List<Integer> mounths) {
        this.type = type;
        this.mounths= mounths;
    }

    public static TravelTimeType getTimeByType(Integer type){
        for (TravelTimeType value : values()) {
            if(value.getType().equals(type)){
                return value;
            }
        }
        return null;
    }
}
